|
![](/i/fill.gif) |
Xplo Eristotle wrote:
> Finally, it's my opinion that the POV language is *already* OO. I would
> love for anyone who disagrees to explain to me how
Ok, I agree that POV is already OO. I personnally prefer the current "braces"
syntax, but let's say that it's just because I was trained in procedural
programming and that "dot" syntaxes are better for POV (note : I agree that they
are in professional development environments).
Now, what a full pov scene would look like if it was coded like that ?
For example, could it be possible to have an ideal "dot" translation of something
like the following (extract of a scene I'm working on). Or of a large CSG
construct ? I'm just curious.
G.
#declare m=2;
#declare ry=1*m;
#declare a=degrees(m/ry);
#declare at=0;
#declare tr=80;
#declare Pave = object{ #include "pave.inc" translate y*0.5 scale m*0.5*1.6}
#declare Paves=array[8]
#declare Paves[0]=object{Pave}
#declare Paves[1]=object{Pave rotate y*90}
#declare Paves[2]=object{Pave rotate y*180}
#declare Paves[3]=object{Pave rotate y*270}
#declare Paves[4]=object{Pave scale <-1,1,1>}
#declare Paves[5]=object{Pave scale <-1,1,1> rotate y*90}
#declare Paves[6]=object{Pave scale <-1,1,1> rotate y*180}
#declare Paves[7]=object{Pave scale <-1,1,1> rotate y*270}
#declare rd=seed(0);
#declare finPave=finish{ambient 0 diffuse 0.6 specular 0.02 roughness 0.05}
#declare sc=0.1;
#declare colPave=colHouse1+<0,0.04,0.04>;
#declare Sol=union{
#while (at<360*tr)
#declare np=int(rand(rd)*8);
#declare vpos=vaxis_rotate(ry*x,y,at);
#declare vturb=vturbulence(3, 0.5, 6, vpos*0.008); // Thanks Chris Huff
!!!
#declare vturb2=vturbulence(3, 0.5, 6, vpos*0.08);
#declare coltmp=color colPave*(1+abs(vturb2.x));
object{Paves[np]
rotate (1-rand(rd))*20*y
scale <1,(1+vturb.y*2)*0.3,1>
translate <ry,(1+vturb.y*2)*0.3,0>
rotate y*at
texture{
pigment{granite color_map{[0 coltmp][0.4
coltmp][0.6 coltmp*0.8][1 coltmp*0.5]}}
finish{finPave}
scale 0.1
}
}
#declare ry=ry+ m*m/(pi*(2*ry+m));
#declare a=degrees(m/ry);
#declare at=at+a;
#end
}
Post a reply to this message
|
![](/i/fill.gif) |